// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/21/2015 6:16:57 PM				
// -----------------------------

#ifndef _Assert_h
#define _Assert_h

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <tchar.h>

#include <string>
#include <sstream>
using namespace std;

namespace Flow
{

	/* Preprocessor String Operations */
	#define _STR(x)				#x
	#define STR(x)				_STR(x)
	#define STR_CONCAT2(x,y)	x ## y
	#define STR_CONCAT3(x,y,z)	x ## y ## z

	/* Assert */
	#ifdef _DEBUG
		#define ASSERT(x) \
			if(!(x)) \
			{ \
				stringstream stream; \
				stream << "*************** ASSERTION FAILURE ***************\n"; \
				stream << STR(x) << "\n"; \
				stream << "File: " << __FILE__ << " (" << __LINE__ << ")\n"; \
				stream << "*************************************************\n"; \
				OutputDebugStringA(stream.str().c_str()); \
				__debugbreak(); \
			}
	#else
		#define ASSERT(x)
	#endif

}

#endif